<?php


namespace App\Model;

use PhalApi\Model\NotORMModel as NotORM;


class OrderDetail extends NotORM
{
    public function getOrderDetailInfoByOid($order_id)
    {
        return $this->getORM()->where('oid', $order_id)->fetchAll();

    }
    public function  insertOrderDetailInfo($order_id, $good_id, $goods_num, $goods_money)
    {
        $data = array('oid' => $order_id, 'gid' => $good_id, 'num' => $goods_num, 'money' => $goods_money);
        $orm = $this->getORM();
        $orm->insert($data);
        return $orm->insert_id();
    }
}